//
//  MusicAVPlayer.h
//  YHYRealx
//
//  Created by yanghuiyan on 16/5/4.
//  Copyright © 2016年 yanghuiyan. All rights reserved.
//

#import <AVFoundation/AVFoundation.h>
#import "SongListSongsDetailModel.h"
#import "SongListSongsModel.h"
#import "SongListUrlListModel.h"
#import "SongListAuditionListModel.h"

typedef NS_ENUM(NSUInteger, playStyle) {
    ORDERPLAY,
    REPEATONE,
    ARCPLAY,
};
@interface MusicAVPlayer : AVPlayer

@property (nonatomic, assign) playStyle style;/**< 播放模式 */

@property (nonatomic, assign) BOOL isPlay;/**< 判断是否播放 */

@property (nonatomic, assign) NSInteger local;/**< 播放第几个 */

@property (nonatomic, retain) SongListSongsDetailModel *songDetailModel;

@property (nonatomic, retain) SongListSongsModel *songsModel;

@property (nonatomic, retain) NSTimer *timer;

@property (nonatomic, retain)AVPlayerItem *playerItem;/**< 播放item */

@property (nonatomic, retain)UIProgressView *videoProgress;/**< 播放进度 */

@property (nonatomic, retain)AVPlayerLayer *playerLayer;/**< 播放palyer */

//@property (nonatomic, strong) NSString *MVURL;

//typedef double NSTimeInterval;

- (void)playWithURL:(SongListSongsModel *)songListModel; /**< 传model播放 */

+(instancetype)shareMusicAVPlayer;/**< 创建单例 */

@end
